<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta id="viewport" name="viewport"
		content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<title></title>
		

		<script type="text/javascript" src="./HZRecorder.js">
			
		</script>
		
		
	<script>
		 
	    var recorder;
		 	console.log("script...");
	   var audio = document.querySelector('audio');
		
		
		function test1(){
			console.log("recording");
			     HZRecorder.get(function (rec) {
							console.log(rec);
			         recorder = rec;
			         recorder.start();
			     });
		}
		 function test2(){
		 	console.log("stop");
			recorder.stop();
		 }
		 function test3(){
			console.log("play");
			 recorder.play(audio);
		}
		  
	</script>
	</head>
	
	<body>
	
	
	<div>
	      <!--  <audio controls autoplay></audio> -->
		  <button type="button" onclick="test1()">录音</button>
		  <button type="button" onclick="test2()">停止</button>
		  <button type="button" onclick="test3()">播放</button>
	 </div>

	
	</body>
	

</html>
